import i18n from '@/i18n'
const { t } = i18n.global

// 校验手机号
export const checkPhone = (rule: any, value: string, callback: Function) => {
  const reg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/
  if (reg.test(value)) {
    return callback()
  }
  return callback(new Error(t('CENTER.PHONE_TRUE_PLACEHOLDER')))
}
